The present invention relates to an arithmetic processing apparatus which is preferably used in image processing and the like.
An image processing apparatus which has been developed by the present applicant executes two-dimensional operation (affine transform, polar coordinate transform, spatial filtering, and the like) of performing arithmetic processing of outputting one data (one pixel) as a result of two-dimensional spatial data (a plurality of input data), and main operation which is the core of image processing such as FFT (Fast Fourier Transform) and DCT (Discrete Cosine Transform). In two-dimensional operation such as affine transform, arithmetic processing of outputting one data (one pixel) as a result of two-dimensional spatial data (a plurality of input data) is executed.
Affine transform is to perform geometrical transform such as moving, rotation, enlargement, and reduction for image data (pixel). For example, in pattern matching, matching is difficult in the presence of a positional shift, rotational shift, or scaling difference (enlargement/reduction) between a registered pattern and a matching pattern. To remove the positional shift, rotational shift, or scaling difference, image data is geometrically operated for either of the registered and matching patterns.
In an arithmetic processing apparatus which has been proposed by the present applicant and is disclosed in Japanese Patent Laid-Open No. 2000-222384, a main arithmetic unit sequentially receives instructions from a main controller before main operation, and executes two-dimensional operation such as affine transform, polar coordinate transform, or spatial filtering by software. According to this method, two-dimensional operation starts upon sequential reception of instructions from the main controller. This takes a long time, failing to increase the speed.
To prevent this, it is considered to separate two-dimensional operation from the main arithmetic unit and arrange a dedicated two-dimensional arithmetic unit as hardware on the input stage of the main arithmetic unit. FIG. 9 shows the main part of this image processing apparatus. In FIG. 9, reference numeral 1 denotes a data storage which stores many image data to be processed; 2, a two-dimensional arithmetic unit which performs two-dimensional operation such as affine transform, polar coordinate transform, or spatial filtering; 3, a main arithmetic unit which performs main operation such as FFT or DCT; and 4, a switch. In the image processing apparatus, the main arithmetic unit 3 executes, e.g., FFT processing. The two-dimensional arithmetic unit 2 comprises an affine transform unit 2-1 which performs affine transform, a polar coordinate transform unit 2-2 which performs polar coordinate transform, and a spatial filtering unit 2-N which performs spatial filtering.
To perform affine transform before FFT processing in the image processing apparatus, the switch 4 is switched to the affine transform unit 2-1. Image data is then read out from the data storage 1, subjected to affine transform by the affine transform unit 2-1, and returned to the data storage 1. The image data which has been returned to the data storage 1 is sent to the main arithmetic unit 3, subjected to FFT processing, and returned to the data storage 1. Similarly, to perform polar coordinate transform before FFT processing, the switch 4 is switched to the polar coordinate transform unit 2-2. To perform spatial filtering before FFT processing, the switch 4 is switched to the spatial filtering unit 2-N.
In this image processing apparatus, the two-dimensional arithmetic unit 2 must be equipped with processors by the number of types of necessary processes, resulting in a large circuit scale.